﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ProjetCom.Ctrl;

namespace ProjetCom.Vue
{
    class LevelCompetence : Level
    {
        public LevelCompetence(IServiceProvider p_serviceProvider, CtrlTemplate p_ctrl)
            : base(p_serviceProvider, p_ctrl)
        {
        }

        public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch p_spriteBatch)
        {
            SpriteFont font = Content.Load<SpriteFont>("SpriteFont/SpriteFontCompetence");
            string strPage = "";

            strPage += ((Ctrl.CtrlCompetence)m_Ctrl).CategorieLabel + "\n\n";

            foreach (string competence in ((Ctrl.CtrlCompetence)m_Ctrl).Text)
            {
                strPage += competence;
            }

            p_spriteBatch.DrawString(font,
                strPage,
                new Vector2(64, 10),
                Color.White);

            DrawRetourMenu(p_spriteBatch);
        }


        protected void DrawRetourMenu(SpriteBatch p_spriteBatch)
        {
            SpriteFont font = Content.Load<SpriteFont>("SpriteFont/SpriteFont");
            string strLife = "F1 pour revenir au menu";

            p_spriteBatch.DrawString(font, strLife, new Vector2(970, 0), Color.White);
        }

        public override void Dispose()
        {
        }
    }
}
